import { fetchPost } from '../request/request'
import {
  IVulDetailsRootObject,
  IVulnerabilityInformationListParams,
  IVulnerabilityInformationListRoot,
  VulDetailParams
} from '../../types'

export const getVulnList = (params: IVulnerabilityInformationListParams) =>
  fetchPost<IVulnerabilityInformationListRoot>(`/web/homePage/cnnvdVulList`, params)

export const getVulDetails = (params: VulDetailParams) =>
  fetchPost<IVulDetailsRootObject>(`/web/cnnvdVul/getCnnnvdDetailOnDatasource`, params)
